{include file='ajax.header.tpl'}
	<div id="options">
		<input type="button" value="{_ t="Guardar"}"   id="product_save" class="save">
		<input type="button" value="{_ t="Cancelar"}" id="product_cancel" class="cancel">
		<input type="button" value="{_ t="Eliminar"}" id="product_delete" class="delete" >
	</div>

	<h1><img src="../public/icons/16x16/apps/{$ITEM_TYPE}.png"/>{_ t="Producto"} #{$product->id}</h1> 	

	<div id="icontent">
		<ul id="lang">
		{foreach from="$languages" key="iso" item="lang"}
			<li id="li_{$iso}"><a id="lang_{$iso}">{$lang}</a></li>
		{/foreach}
		</ul>

		<br style="clear:both;">

		<div id="blocks">
			{include file='ajax_products.component.tpl'}
			{include file='ajax_categories.component.tpl'}
			{include file='ajax_images.component.tpl'    }
		</div>

		<div id="icontent-lang">
			<div id="product_working"></div>
				<form id="product_form" action="index.php?c=ajax_products&a=product_save&id={$product->id}" method="post">
				{foreach from="$languages" key="iso" item="lang"}
					<div id="edit_{$iso}" class="edit_lang" style="display:none;">
					<b>{_ t="T&iacute;tulo" }</b>
					{assign var="title_lang" value="title_$iso"}
					<input type="text" value="{$product->$title_lang}" name="{$title_lang}">
					<b>{_ t="Intro" }</b>
					{assign var="intro_lang" value="intro_$iso"}
					<textarea name="{$intro_lang}">{$product->$intro_lang}</textarea>
					<b>{_ t="Contenido" }</b>
					{assign var="content_lang" value="content_$iso"}
					<textarea name="{$content_lang}">{$product->$content_lang}</textarea>
					</div>
				{/foreach}
				</form>
		</div>
	</div>
</div>
	
{tinyMCE width="390" height="300"}
<script type="text/javascript">
var ITEM_ID   = '{$product->id}';
var ITEM_TYPE = '{$ITEM_TYPE}';
var ITEM_RELATION = 'item';
var LANGS = new Array('es','en');
product_init();
</script>
{include file='ajax.footer.tpl'}
